* progmodes/python.el:
authorFabián Ezequiel Gallina <fabian@anue.biz>
Mon, 26 Nov 2012 23:31:06 +0000 (20:31 -0300)
committerFabián Ezequiel Gallina <fabian@anue.biz>
Mon, 26 Nov 2012 23:31:06 +0000 (20:31 -0300)
(python-indent-guess-indent-offset): If indentation is guessed
make python-indent-offset variable buffer local.

lisp/ChangeLog
lisp/progmodes/python.el

index a029bce443f41b17a6fc2882d2bcce6077bab1c1..f6e0ce5f2dce71cb73d26ca2aa33ef1d1881564e 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-26  Fabián Ezequiel Gallina  <fgallina@cuca>
+
+       * progmodes/python.el:
+       (python-indent-guess-indent-offset): If indentation is guessed
+       make python-indent-offset variable buffer local.
+
 2012-11-26  Fabián Ezequiel Gallina  <fgallina@cuca>
 
        Fix Imenu regression.
index cfd3a73e1b0d8421ffadf5b73a5f788ed57b672f..7cd59c0c1b42cad0e41909d11107d0544c98ef0a 100644 (file)
@@ -647,7 +647,7 @@ These make `python-indent-calculate-indentation' subtract the value of
                  (python-util-forward-comment)
                  (current-indentation))))
           (if indentation
-              (setq python-indent-offset indentation)
+              (set (make-local-variable 'python-indent-offset) indentation)
             (message "Can't guess python-indent-offset, using defaults: %s"
                      python-indent-offset)))))))